package com.itlong.cloud.property.dao;

import com.itlong.cloud.POJO.PO.DeviceElevatorAuthPO;
import com.itlong.cloud.POJO.VO.jd.JDCloudElevatorFaceVO;
import com.itlong.cloud.abstracts.IAbstractBaseDao;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * <desc>
 *       物业系统用户电梯设备权限数据访问接口
 * </desc>
 *
 * @createDate 2017/10/11
 */
@Mapper
@Repository
public interface IPropertyDeviceElevatorAuthDao extends IAbstractBaseDao<DeviceElevatorAuthPO>{
    /**
     * <desc>
     *      获取用户电梯设备权限
     * </desc>
     * @param params
     * @return List<DeviceElevatorAuthPO> 用户电梯权限实体对象集
     * @author zhangs
     * @createDate 2017/10/11
     */
    List<DeviceElevatorAuthPO> getUserDeviceElevatorAuth(Map<String, Object> params);

    /**
     * <desc>
     *      更新用户电梯设备权限
     * </desc>
     * @param deviceElevatorAuthPO
     * @return
     * @author zhangs
     * @createDate 2017/10/11
     */
    Integer update(DeviceElevatorAuthPO deviceElevatorAuthPO);

    /**
     * <desc>
     *      保存用户电梯设备权限
     * </desc>
     * @param params
     * @return
     * @author zhangs
     * @createDate 2017/10/11
     */
    Integer save(Map<String, Object> params);

    /**
     * <desc>
     *      删除用户电梯设备权限
     * </desc>
     * @param id 删掉的数据的Id
     * @return
     * @author zhangs
     * @createDate 2017/10/11
     */
    Integer deleteById(String id);


    /**
     * <desc>
     *      获取jd设备id和旺龙机号（deviceUnique或者deviceId）的映射
     * </desc>
     * @param   params
     * @return
     * @author pengwei
     * @createDate 2020/12/10
     */
    List<JDCloudElevatorFaceVO>  getJDDeviceIdMapList(Map<String, Object> params);


    /**
     * <desc>
     *      获取权限记录Id
     * <desc/>
     *
     * @param params
     * @return
     * @author Chunjian.G
     * @createDate 2017-12-27
     */
    List<Integer> getUserDeviceElevatorAuthId(Map<String, Object> params);

    /**
     * <desc>
     *      获取楼层权限标识列表
     * <desc/>
     *
     * @param params
     * @return
     * @author pengwei
     * @createDate 2020-12-10
     */
    List<String>  getNaturalFloorList(Map<String, Object> params);

    /**
     * <desc>
     *    根据电梯deviceUnique找出绑定该电梯的平板device列表
     * <desc/>
     *
     * @param params
     * @return
     * @author pengwei
     * @createDate 2020-12-15
     */
    List<String>  getBindElevatorPadList(Map<String, Object> params);

    /**
     * <desc>
     *      查询电梯的起始楼层及结束楼层
     * </desc>
     *
     * @param getMinAndMaxFloor
     * @return
     * @author pengwei
     * @createDate 2020/12/21
     */
    Map<String,Object> getMinAndMaxFloor(String deviceUnique);

}
